package main

import "fmt"

func main() {
	// 多态
	var functest AddFunc
	functest = test1
	functest(1, 2)

	functest = test2
	functest(1, 2)
}

type AddFunc func(a int, b int)

func test1(a int, b int) {
	fmt.Println(a + b)
}

func test2(a int, b int) {
	fmt.Println("result is ", a+b)
}
